home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRNOMY / GRVKIT02.ZIP / GRAVKIT.ING < prev    next >
Text File  |  1994-01-07  |  8KB  |  220 lines

  1.  
  2.  
  3.  
  4.                 GravKit v0.2  11-Dic-93
  5.                     
  6.                     Manual
  7.  
  8.  
  9.                    *   *   *
  10.  
  11.  
  12. GravKit is a whole of program for the gravitational simulation of a n-body
  13. system. There are three programs:
  14.        
  15.  Cluster   It perform the calculus from a file with the initial conditions
  16.            that describe the n-body system. It allow the graphic view
  17.        and the save of the path in file with many formats.
  18.        
  19.  Movie     It allow to read the files saved from cluster and to play them 
  20.            with various features.
  21.        
  22.  Genr      Procedure in progress. Now build a whole of n-body with random
  23.            initial condition in variable limits.
  24.            
  25.            
  26. ********************************************************************************
  27.  
  28.  
  29. Introduction.
  30. -------------
  31.  
  32. The kernel of cluster grabbed out an article by Alfredo Di Stefano on
  33. 4/93 and 5/93 numbers of the "Commodore Gazette" (IHT Italy). I used
  34. the function called 'Simulate' and 'ClusterLeggi' (ReadCluster). The first
  35. perform the calculus with the gravitational law and no optimization:
  36. for each step and for every body it consider all other n-1 body. This
  37. means a 'little' slowness when the body are > 100 (also with a 486DX).
  38.  
  39.  
  40. Purpose.
  41. --------
  42.  
  43. I have wrote this procedure for three mean ends:
  44.  
  45.  1) to simulate the tides in the galactic interaction or collision
  46.  2) to compare this results with the results from an other artful procedure
  47.     yet in progress
  48.  3) to join the two efforts in a unique program (NGC New Galaxy Collider)
  49.     provided with many function a friendly menu interface and the possibility
  50.     for users to append their calculus functions.
  51.  
  52.  
  53. Animations format.
  54. ------------------
  55.  
  56. Actually the animations can saved in four different formats, with the options
  57. below in cluster program:
  58.  
  59.    Option  Description                                  Extension 
  60.       
  61.       -n    only generic and numeric issue                 .DAT
  62.       -h    pixel incremental issue (HGC e 3270) 720x348   .HGC
  63.       -c    pixel incremental issue (CGA)        320x200   .CGA
  64.       -v    pixel incremental issue (VGA e ATT)  640x480   .VGA
  65.         
  66. With -n you can save the position of the object in double float format
  67. therefore 8 byte for one coordinate. This allow to play the animation with
  68. anyone graphic card, but above all, allow to compare the results with others
  69. procedures.
  70. With the others options the increment in pixel between two steps is saved.
  71. These formats depend from the graphic card used.
  72.  
  73.  
  74. How to obtain a fluid animation.
  75. --------------------------------
  76.  
  77. The animation file must loaded in the hard drive cache memory (e.g. play
  78. once the animation). Then you must load in the "config.sys" a cache program
  79. like the SmartDrive. If you have MS-Windows probably you already have it.
  80. To see how much memory is for cache you can digit:
  81.  
  82.             smartdrv /S <return>
  83.  
  84. Discontinuity or breaks in the animation can depend on various problems
  85. and have various solutions:
  86.  
  87.  Problem                             Solution
  88.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89.  - Cache memory < file length        - Increase size of cache memory
  90.                                      - Use a disk compressor like
  91.                                        Stacker and use SmartDrive only
  92.                                        on compressed partition (the 
  93.                                        compressed file is in cache)
  94.  
  95.  - You haven't EMS or XMS to use     - Use a defrag program like
  96.    like cache memory                   Compress (PcTools) or SpeedDisk (Norton)
  97.    
  98.  
  99.  
  100. Cluster.
  101. --------
  102.  
  103. USE: cluster <option> <res> filename <steps>
  104.  
  105.      [option] = -g only graphic issue (default)
  106.           = -G only graphic issue without tracks
  107.           = -t only graphic issue with limited tracks
  108.               = -n only generic and numeric issue
  109.               = -h pixel incremental issue (HGC e 3270) 720x348
  110.               = -c pixel incremental issue (CGA)        320x200
  111.               = -v pixel incremental issue (VGA e ATT)  640x480
  112.           = -gn both graphic and numeric issue
  113.     [res] = /0 autodetect of graphic card (default)
  114.           = /1 CGA 320x200 4 color
  115.           = /2 HGC 720x384 2 color Hercules
  116.           = /3 ATT 640x400 2 color Olivetti
  117.           = /4 VGA 640x480 16 color
  118.       [steps] = # of step (only with -n|-h|-c|-v)
  119.  
  120.  
  121. The file name must have the extension:
  122.  
  123.            cluster sunearth.clu
  124. equal to:
  125.            cluster -g /0 sunearth.clu
  126.  
  127. The .CLU files format is:
  128.  
  129. START_DATA: SunEarth.clu
  130. DELTA 0.00027
  131. PROXIMITY 0.001 
  132. MAGNIFICATION 0.001
  133. #BODY 2
  134. COORDINATES_XYZ              VELOCITY_XYZ         MASS        COLOR
  135.    0    0     0           0.00   0.00   0.00      2.00           4
  136.    1    0     0           0.00   8.88   0.00      1e-6           1
  137. END_DATA
  138.  
  139. Where the coordinates are in A.U. and mass in solar mass. In the next version
  140. I will include the possibility to get the gravitational constant (G) in order
  141. to use a different unit system.
  142.  
  143. The color are like below, only for CGA and VGA graphic card:
  144.  
  145.               VGA COLOR    |  #  | CGA COLOR
  146.             ---------------------------------
  147.               BLUE         |  1  | LIGHTGREEN 
  148.               GREEN        |  2  | LIGHTRED     
  149.               CYAN         |  3  | YELLOW
  150.               RED          |  4  | LIGHTGREEN 
  151.               MAGENTA      |  5  | LIGHTRED     
  152.               BROWN        |  6  | YELLOW
  153.               LIGHTGRAY    |  7  | LIGHTGREEN 
  154.               DARKGRAY     |  8  | LIGHTRED     
  155.               LIGHTBLUE    |  9  | YELLOW
  156.               LIGHTGREEN   | 10  | LIGHTGREEN 
  157.               LIGHTCYAN    | 11  | LIGHTRED     
  158.               LIGHTRED     | 12  | YELLOW
  159.               LIGHTMAGENTA | 13  | LIGHTGREEN 
  160.               YELLOW       | 14  | LIGHTRED     
  161.               WHITE        | 15  | YELLOW
  162.               
  163.               
  164.               
  165. Movie.
  166. ------
  167.  
  168. USE: movie [opt] [res] filename.<ext> [delay]
  169.  
  170.      [opt] = -t with tracks
  171.      [res] = /0 autodetect graphic card (default)
  172.        = /1 CGA  320x200 4 color
  173.        = /2 HGC  720x348 2 color Hercules
  174.        = /3 3270 720x350 2 color PC3270
  175.        = /4 ATT  640x400 2 color Olivetti
  176.        = /5 VGA  640x480 16 color
  177.    [delay] = delay in ms (default->0)
  178.      <ext> = dat -> generic file (double) and default
  179.        = cga -> pixel incremental file (CGA)
  180.        = hgc -> pixel incremental file (HGC and 3270)
  181.        = vga -> pixel incremental file (VGA and ATT)
  182.  
  183. On Olivetti M24 try this to use ATT card instead of CGA (autodetect):
  184.  
  185.           movie /4 nomefile.vga
  186.           
  187. if you want 30 step length tracks and a 0.3 secs delay:
  188.  
  189.           movie -t30 /4 nomefile.vga 300
  190.  
  191. After you run program, you can position the first frame using cursors. Then
  192. you can start/PAUSE animation using <space>. At end use "<" key to rewind.
  193. If you press "l" at start you have an infinite loop.
  194. ESC to quit, at any time.
  195.  
  196.  
  197. ********************************************************************************
  198.  
  199. This program was put in the Public Domain by the author. It may be distributed
  200. freely. It may not be sold, nor be made part of anything that is sold.
  201.  
  202. If you like it send a email or a postcard to:
  203.  
  204.        Alessandro Freda 
  205.        Via Maona 3/10
  206.        16155 Genova-Pegli
  207.        ITALY
  208.  
  209. email: freda@dist.dist.unige.it
  210.  
  211. If my program will interest many people I will upload on
  212. bbs and internet the next version.
  213.  
  214. Report on bug, requests, advice, suggestion are welcomed.
  215.  
  216. ... and ... I'm sorry but usually my English is very scarce.
  217.             I hope to be comprehensible.
  218.  
  219. ********************************************************************************
  220.